home *** CD-ROM | disk | FTP | other *** search
/ Trading on the Edge / Trading On The Edge - CD-ROM Toolkit (Wayzata Technology)(2031)(1994).bin / pc / mac_file / vendor_d / neuralwa / nw2v50 / uio_strc.h < prev    next >
Text File  |  1993-08-23  |  8KB  |  243 lines

  1. /* uio_strc.h */
  2. /************************************************************************
  3.  * Copyright(C) 1987-1992 NeuralWare Inc                                *
  4.  * Penn Center West, IV-227, Pittsburgh, PA 15276                       *
  5.  * Telephone: (412) 787-8222    FAX: (412) 787-8220                     *
  6.  *                                                                      *
  7.  * All rights reserved.  No part of this program may be reproduced,     *
  8.  * stored in a retrieval system, or transmitted, in any form or by any  *
  9.  * means, electronic, mechanical, photocopying, recording or otherwise  *
  10.  * without the prior written permission of the copyright owner,         *
  11.  * NeuralWare, Inc.                                                     *
  12.  *                                                                      *
  13.  *                          PROPRIETARY NOTICE                          *
  14.  *                                                                      *
  15.  * This document is the property of NeuralWare, Inc. and contains       *
  16.  * trade-secrets and other proprietary information.  The information    *
  17.  * herein is reserved as proprietary to NeuralWare, and is not to be    *
  18.  * published, reproduced, copied, disclosed, used, or reverse           *
  19.  * engineered without the express written consent of a duly authorized  *
  20.  * representative of NeuralWare.                                        *
  21.  ************************************************************************
  22.  */
  23.  
  24. /*******************************************************************/
  25. /*                                                                 */
  26. /*    uio_strc.h - structure definitions for UserIO interface      */
  27. /*                 arguments                                       */
  28. /*    Author: John C. Fairman           August 31, 1990            */
  29. /*    Copyright 1990 by NeuralWare Inc.                            */
  30. /*                                                                 */
  31. /*    $Author   :  $                                               */
  32. /*    $Date     :  $                                               */
  33. /*    $Source   :  $                                               */
  34. /*    $Revision :  $                                               */
  35. /*    $Log      :  $                                               */
  36. /*                                                                 */
  37. /*******************************************************************/
  38.  
  39. #ifndef UIO_STRC_H
  40. #define UIO_STRC_H 1
  41.  
  42.  
  43.  
  44. #if 0 /* If you want a full test you must define FULLTEST here
  45.      since THINK_C doesn't have command line defines */
  46. #ifdef THINK_C
  47. #define FULLTEST       1
  48. #endif  /* THINK_C */
  49. #endif
  50.  
  51.  
  52.  
  53. /* */
  54. typedef struct {
  55.   SREAL        ape_I;                 /* sum */
  56.   SREAL        ape_Tran;              /* tran */
  57.   SREAL        ape_Output;            /* output */
  58.   SREAL        ape_Err;               /* error */
  59.   SREAL        ape_CumErr;            /* cumulative error */
  60.   UNINT        ape_Flags;             /* flags */
  61. } APE;
  62.  
  63. typedef struct {
  64.   SL           asc_recall;            /* recall counter */
  65.   SREAL        asc_rcl[10];            /* recall data */
  66.   SL           asc_learn;             /* learn counter */
  67.   SREAL        asc_lrn[10];            /* learn data */
  68. } ASCOL;
  69.  
  70. typedef struct {
  71.   TEXT         asc_nam[16];           /* schedule name */
  72.   ASCOL        asc_col[5];            /* data columns */
  73. } ASCHED;
  74.  
  75. typedef struct {
  76.   UNINT        start_in;
  77.   UNINT        start_out;
  78.   SREAL        min_in;
  79.   SREAL        max_in;
  80.   SREAL        min_out;
  81.   SREAL        max_out;
  82. } IOPARMS;
  83.  
  84. typedef struct {
  85.    UNINT      num_pes;
  86.    UNINT      n_wt_flds;
  87.    UNINT      sum_f;
  88.    UNINT      tran_f;
  89.    UNINT      output_f;
  90.    UNINT      learn_f;
  91.    UNINT      error_f;
  92.    UNINT      noise_f;
  93.    /* The following are the only ones that can be written to */
  94.    SREAL      scale;
  95.    SREAL      offst;
  96.    SREAL      fprm_offst;
  97.    SREAL      low_init;
  98.    SREAL      high_init;
  99.    SREAL      unused;
  100. } ALYR;
  101.  
  102. #ifndef N2PRUNE
  103. #ifndef NPHIST
  104. #define NPHIST   100          /* # of items in histogram */
  105. #endif
  106. typedef struct {
  107.   SL       PRNwts;          /* # of weights in network */
  108.  
  109.   SREAL    PRMin;           /* smallest weight */
  110.   SREAL    PRMax;           /* maximum weight */
  111.   SREAL    PRSum;           /* sum of weights */
  112.   SREAL    PRAverage;       /* average weight */
  113.   SREAL    PRMedian;        /* median value */
  114.   NINT     PRHist[NPHIST];  /* histogram of weights */
  115.  
  116.   SREAL    PRMinA;          /* min absolute magnitude */
  117.   SREAL    PRMaxA;          /* max absolute magnitude */
  118.   SREAL    PRSumA;          /* sum of abs values */
  119.   SREAL    PRAverageA;      /* average absolute weight */
  120.   SREAL    PRMedianA;       /* median of magnitudes */
  121.   NINT     PRHistA[NPHIST]; /* histogram of magnitudes */
  122. } PRSTATS;                    /* prune statistics */
  123. #endif
  124.  
  125. /* Window management */
  126. #if defined(USES_WINDOWS) && !defined(TEST)
  127. struct _uwin                    /* user i/o window */
  128. {
  129.   UB        uw_flag;          /* flag for in use */
  130. #define UWF_INUSE   0x01   /* this window is "inuse" */
  131. #define UWF_UNDISP  0x02   /* window has been erased */
  132.   UB        uw_color;         /* background color */
  133.   RECTANGLE uw_box;           /* coordinates of the box */
  134. };
  135. typedef struct _uwin       UWIN;
  136.  
  137. #define NWINS          8
  138. #endif /* defined(USES_WINDOWS) && !defined(TEST) */
  139.  
  140. /* Host UIO errors */
  141. #define UNABLE_TO_ALLOCATE_VEC      0x80
  142.  
  143. /* Server UIO errors */
  144. #define BAD_WINDOW_NUMBER           0x90
  145.  
  146. /* User Return Values */
  147. #define UIO_OK                      0
  148. #define UIO_UPDATE                  1
  149. #define UIO_EXIT                    2
  150. #define UIO_ERROR                  -1
  151.  
  152.  
  153. #ifdef HOME_FOR_UIO_DATA
  154.  
  155.  
  156. #ifndef DP_RUN
  157. #ifdef UIO_SERVER
  158. GLOBALDEF NINT gm_intcolor = 0;    /* interior color */
  159. GLOBALDEF NINT gm_outcolor = 0;    /* outline color */
  160. GLOBALDEF NINT gm_txtcolor = 0;    /* text color */
  161. #endif
  162.  
  163. #if !defined(UIO_SERVER) || !defined(EMULATING)
  164. GLOBALDEF NINT UIO_error_value = 0;
  165. #else /* !defined(UIO_SERVER) || !defined(EMULATING) */
  166. GLOBALREF NINT UIO_error_value;
  167. #endif /* else of !defined(UIO_SERVER) || !defined(EMULATING) */
  168. #endif /* not DPTEST */
  169. #else  /* HOME_FOR_UIO_DATA */
  170.  
  171. #ifndef DPTEST
  172. GLOBALREF NINT UIO_error_value;
  173. #endif
  174.  
  175.  
  176. #ifndef DPTEST
  177. #ifdef UIO_SERVER
  178. GLOBALREF NINT gm_intcolor;        /* interior color */
  179. GLOBALREF NINT gm_outcolor;        /* outline color */
  180. GLOBALREF NINT gm_txtcolor;        /* text color */
  181. #endif
  182. #endif
  183.  
  184. #endif /* HOME_FOR_UIO_DATA */
  185.  
  186.  
  187. #ifndef SKIP_COMPAT_DATA
  188.  
  189. #ifdef HOME_FOR_COMPAT_DATA
  190. GLOBALDEF SREAL *IODATA  = (SREAL *)NULL;
  191. GLOBALDEF NINT  IOCOUNT  = 0;
  192. GLOBALDEF NINT  IOLAYER  = 0;
  193. GLOBALDEF NINT  IOREQCDE = 0;
  194. GLOBALDEF NINT  IORTNCDE = 0;
  195. #else /* HOME_FOR_COMPAT_DATA */
  196. GLOBALREF SREAL *IODATA;
  197. GLOBALREF NINT  IOCOUNT;
  198. GLOBALREF NINT  IOLAYER;
  199. GLOBALREF NINT  IOREQCDE;
  200. GLOBALREF NINT  IORTNCDE;
  201. #endif /* else of HOME_FOR_COMPAT_DATA */
  202.  
  203. #endif /* USES_COMPAT_DATA */
  204.  
  205. /* */
  206.  
  207. #ifdef MAC
  208. #include   "macuio.h"
  209. #endif
  210.  
  211. /* Usual configuration */
  212. #define GRUPDATE(a, b, c) GRUpdate(a, b, c); /* <- note ';' */
  213. #define MOVEMEM(a, b, c) memcpy((char *)a, (char *)b, (size_t)c)
  214. #define SET_STRUCTS_EQ(a, b) a = (b)
  215. #define CTRIO_T long
  216. #define TRIAL_NUM_T long
  217. #define MSGLEN_T int
  218. #define MSGDIR_T int
  219.  
  220. /* Variants from the usual configuration */
  221. #if defined(IBP) || defined(I860) || defined(IBM)
  222. #ifdef HOST
  223. #undef CTRIO_T
  224. #define CTRIO_T int
  225. #undef TRIAL_NUM_TYPE
  226. #define TRIAL_NUM_TYPE int
  227. #endif
  228. #if defined(NDP) || defined (__ZTC__)
  229. #define REAL_ARGS_PROBLEM
  230. #endif
  231. #endif
  232.  
  233. #if defined(MAC)
  234. #ifdef HOST
  235. #undef MSGLEN_T
  236. #define MSGLEN_T short
  237. #undef MSGDIR_T
  238. #define MSGDIR_T short
  239. #endif
  240. #endif
  241.  
  242. #endif /* ifndef UIO_STRC_H */
  243.